package cn.itsource.pethome.org.service.impl;

import cn.itsource.pethome.basic.service.impl.BaseServiceImpl;
import cn.itsource.pethome.basic.util.PageInfo;
import cn.itsource.pethome.org.domain.DictionaryDetail;
import cn.itsource.pethome.org.mapper.DictionaryDetailMapper;
import cn.itsource.pethome.org.query.DictionaryDetailQuery;
import cn.itsource.pethome.org.service.IDictionaryDetailService;
import cn.itsource.pethome.org.domain.DictionaryDetail;
import cn.itsource.pethome.org.mapper.DictionaryDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class DictionaryDetailServiceImpl extends BaseServiceImpl<DictionaryDetail> implements IDictionaryDetailService {
    @Autowired(required = false)
    DictionaryDetailMapper mapper;
    @Override
    @Transactional
    public void save(DictionaryDetail dictionaryDetail) {
        if (dictionaryDetail.getId() == null) {
            mapper.save(dictionaryDetail);
        }else {
            mapper.update(dictionaryDetail);
        }
    }


}
